import { View, Text, Image, Input } from '@tarojs/components'
import { useLoad } from '@tarojs/taro'
import './index.scss'
import { useState } from 'react'

// import Home from '@/src/views/Home'

export default function Notify() {
	useLoad(() => {
		console.log('Page loaded.')
	})

	const [isSearch, setIsSearch] = useState(false)

	const [tabs] = useState(['订阅', '收件箱'])

	const [activeTabName, setActiveTabName] = useState('订阅')

	return (
		<View className='notify'>
			<View className='tabbar'>
				{tabs.map((tab) => (
					<View
						className={activeTabName === tab ? 'tab active' : 'tab'}
						onTap={() => {
							setActiveTabName(tab)
						}}
					>
						{tab}
					</View>
				))}
			</View>
			<View className='search'>
				<Input className='input' placeholder='请输入检索内容'></Input>
			</View>
			{isSearch ? (
				<View></View>
			) : (
				<>
					<View className='topic'>已订阅</View>
					<View className='topic'>推荐</View>
				</>
			)}
		</View>
	)
}
